package cn.kgc.springcloud.controller;

import cn.kgc.springcloud.client.Service2Client;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 课工场
 * @date 2024/7/23
 * @description
 */
@RestController
@RequestMapping("s1")
public class Service1Controller {


    @Resource
    private Service2Client service2Client;
    @GetMapping("m1")
    public String  method1(Integer id){

        String s = service2Client.method1(id);
        return "Service1Controller invoke Service2Controller  >> "+s;
    }
}
